package cn.iocoder.yudao.module.member.assets.job;

import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler;
import cn.iocoder.yudao.module.member.assets.service.AppCryptocurrencyIncreasingTaskService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Component;

/**
 * 任务过期 Job
 *
 * @author 山野羡民
 */
@Component("cryptocurrencyIncreasingExpireJob")
public class CryptocurrencyIncreasingTaskExpireJob implements JobHandler {

    @Resource
    private AppCryptocurrencyIncreasingTaskService appCryptocurrencyIncreasingTaskService;

    @Override
    //@TenantJob
    public String execute(String param) {
        int count = appCryptocurrencyIncreasingTaskService.autoCompleteOrExpire();
        return StrUtil.format("已完成或已过期的联盟豆增值任务 {} 个", count);
    }

}
